﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Ivas.aspx.cs" Inherits="SistemaFacturacionWeb.Formulario_web11" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }
        .auto-style2 {
            height: 50px;
        }
        .auto-style3 {
            width: 86px;
        }
        .auto-style4 {
            height: 50px;
            width: 86px;
        }
        .auto-style5 {
            width: 187px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table class="auto-style1">
        <tr>
            <td class="auto-style3" style="text-align: right">Descripción:</td>
            <td colspan="2">
                <asp:TextBox ID="TxtDescripcionIva" runat="server" Width="188px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style4" style="text-align: right">Importe:</td>
            <td class="auto-style2" colspan="2">
                <asp:TextBox ID="TxtImporteIva" runat="server" Width="98px"></asp:TextBox>
                <br />
            </td>
        </tr>
        <tr>
            <td class="auto-style3">&nbsp;</td>
            <td class="auto-style5">
                <asp:Button ID="BtnGuardarIva" runat="server" Text="Guardar" OnClick="BtnGuardarIva_Click" />
            </td>
            <td>
                <asp:Label ID="LabelMensajeAltaIva" runat="server" Font-Bold="True" Font-Names="Cambria" Font-Size="Large" ForeColor="Maroon"></asp:Label>
            </td>
        </tr>
    </table>
    <h1>Ivas</h1>
    <p>
        <asp:GridView ID="GridViewIVAS" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="IDIVA" DataSourceID="SqlDataSource1" EmptyDataText="No hay registros de datos para mostrar." ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField HeaderText="Operaciones" ShowDeleteButton="True" ShowEditButton="True" />
                <asp:BoundField DataField="IDIVA" HeaderText="Id IVA" ReadOnly="True" SortExpression="IDIVA" />
                <asp:BoundField DataField="Descripcion" HeaderText="Descripción" SortExpression="Descripcion" />
                <asp:BoundField DataField="Tarifa" HeaderText="Tarifa" SortExpression="Tarifa">
                <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FacturacionConnectionString1 %>" DeleteCommand="DELETE FROM [IVA] WHERE [IDIVA] = @IDIVA" InsertCommand="INSERT INTO [IVA] ([Descripcion], [Tarifa]) VALUES (@Descripcion, @Tarifa)" ProviderName="<%$ ConnectionStrings:FacturacionConnectionString1.ProviderName %>" SelectCommand="SELECT [IDIVA], [Descripcion], [Tarifa] FROM [IVA]" UpdateCommand="UPDATE [IVA] SET [Descripcion] = @Descripcion, [Tarifa] = @Tarifa WHERE [IDIVA] = @IDIVA">
            <DeleteParameters>
                <asp:Parameter Name="IDIVA" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="Descripcion" Type="String" />
                <asp:Parameter Name="Tarifa" Type="Decimal" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Descripcion" Type="String" />
                <asp:Parameter Name="Tarifa" Type="Decimal" />
                <asp:Parameter Name="IDIVA" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </p>

</asp:Content>
